ToolSet

class ToolSet<TContext>(val byName: Map<String, Tool<*, *, TContext>>)

Erased map of tools indexed by name — what the agent loop actually carries. Application code constructs via toolSetOf.

Erasure (using * projections) is required because a single agent holds tools with different TInput/TOutput types. Type recovery happens at the dispatch site via the tool's own serializers.

Constructors

Link copied to clipboard
constructor(byName: Map<String, Tool<*, *, TContext>>)

Properties

Link copied to clipboard
val byName: Map<String, Tool<*, *, TContext>>
Link copied to clipboard

Functions

Link copied to clipboard
fun find(toolName: String): Tool<*, *, TContext>?
Link copied to clipboard
fun names(): List<String>

Registered tool names — for AgentError.NoSuchTool diagnostics.

Link copied to clipboard
operator fun plus(other: ToolSet<TContext>): ToolSet<TContext>